<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<html>
<head>
    <title>添加／修改城市信息</title>
</head>
<body>
<div class="row">
    <div class="col-lg-12">
        <div class="breadcrumbs fixed">
            <ul class="breadcrumb">
                <li>
                    <a href="/backend/dashboard">首页</a>
                </li>
                <li class="active">添加／修改城市信息</li>
            </ul>
        </div>
        <div class="park_header">
            <div class="portlet">
                <div class="portlet-heading dark">
                    <div class="portlet-title">
                        <h4>添加／修改城市信息</h4>
                    </div>
                </div>
                <div class="portlet-body">
                    <form:form class="form-horizontal" method="post" action="cityform" commandName="cityFormDto">
                        <input name="guid" type="hidden" value="${cityFormDto.guid}">
                        <div class="wizard">
                            <div class="step-content">
                                <div class="step-pane active" id="step1">

                                    <table width="100%">
                                        <tbody><tr>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">城市名称:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control" name="name" value="${cityFormDto.name}" type="text"/>
                                                        </div>
                                                        <form:errors path="name" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">城市首字母:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control" name="code" value="${cityFormDto.code}" type="text"/>
                                                        </div>
                                                        <form:errors path="code" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">Predefined price:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control"  value="${cityFormDto.predefinedPrice}" type="text" autocomplete="off" name="predefinedPrice"/>
                                                        </div>
                                                        <form:errors path="predefinedPrice" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">Predefined distance:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control"  value="${cityFormDto.predefinedDistance}" type="text" autocomplete="off" name="predefinedDistance"/>
                                                        </div>
                                                        <form:errors path="predefinedDistance" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">Price weight:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control" value="${cityFormDto.priceWeight}" type="text" autocomplete="off" name="priceWeight"/>
                                                        </div>
                                                        <form:errors path="priceWeight" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="form-group">
                                                    <label class="col-sm-4 control-label">Distance weight:<span class="necessary">*</span></label>
                                                    <div class="col-sm-8">
                                                        <div class="clearfix">
                                                            <input class="form-control"  value="${cityFormDto.distanceWeight}" type="text" autocomplete="off" name="distanceWeight"/>
                                                        </div>
                                                        <form:errors path="distanceWeight" cssClass="error"/>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="form-actions">
                                <div class="form-group">
                                    <div class="col-sm-offset-5 col-sm-9">
                                        <button type="submit" class="btn btn-prev">保存</button>
                                        <a class="btn" href="cityoverview">返回</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form:form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
